package com.sn.author.controller;

import com.sn.author.domain.BaseResult;
import com.sn.author.domain.dto.HomeInfoDTO;
import com.sn.author.service.dao.BasisService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author xiaom
 * @Date 2020/9/18 10:15
 * @Version 1.0.0
 * @Description <>
 **/
@RestController
@RequestMapping(value = "/basis")
@Api(tags = "首页数据")
public class BasisController {

    @Autowired
    private BasisService basisService;

    @PostMapping(value = "homeInfo")
    @ApiOperation("首页数据")
    public BaseResult<HomeInfoDTO> getHomeInfo(){
        return BaseResult.success(basisService.homeInfo());
    }
}
